package jsi.spider

class WpArt {
	
	def title = ""
	def text = ""
	def url = ""
	def num = ""
	def strong = ""
	def b = ""
	
	def WpArt(){
		title = ""
	}
	
	def String toString(){
		return "WpArt:{title: " + title + ", url: + " + url + ", text: + " + text+ "}"
	}
	
	def addStrong(String str){
		if (strong == null) strong = ""
		if (strong.indexOf(str) == -1){
			strong += " " + str
		}
	}
	def addB(String str){
		if (b == null) b = ""
		if (b.indexOf(str) == -1){
			b += " " + str
		}
	}
	
	def denull(){
		if (title==null) title = "";
		if (text==null) text = "";
		if (url==null) url = "";
		if (num==null) num = -1;
		if (strong==null) strong = "";
		if (b==null) b = "";
	}
}